1. Field of the Invention
The invention relates to a method of encoding and decoding an audio signal for transmitting audio signals at a low bit rate or accumulating audio signal, and more particularly to a method and an apparatus for code conversion and a program used therefor all of which converts a code obtained by encoding audio in accordance with a process, into a code decodable in accordance with another process in high audio quality and with a small amount of calculation.
2. Description of the Related Art
As a method of encoding an audio signal with high efficiency and at a low or middle bit rate, there are known methods of encoding an audio signal, including the step of demultiplexing an audio signal into a linear prediction (LP) filter and an excitation signal in accordance with which the linear prediction filter is driven.
A typical one among such methods is code excited linear prediction (CELP).
In accordance with code excited linear prediction, a LP filter having a LP coefficient indicative of frequency characteristic of input audio is driven with an excitation signal expressed with a sum of an adaptive codebook (ACB) indicative of a pitch cycle of input audio and a fixed codebook (FCB) comprised of a random number and a pulse, to thereby generate a synthesis audio signal. In the generation of a synthesis audio signal, ACB and FCB parts are multiplied with ACB and FCB gains, respectively.
Code excited linear prediction (CELP) is described in M. R. Schroeder and B. S. Atal, “Code Excited Linear Predication (CELP): High-Quality Speech at very low bit rates”, Proc. of IEEE International Conference in Acoustic Speech and Signal Processing, pp. 937-940, 1985 (hereinbelow, referred to as “reference 1”).
For instance, if a 3G (third generation) mobile network and a wire packet network are connected to each other, there is caused a problem that it would not be possible to directly connect the networks to each other, because standard processes for encoding audio used in the networks are different from each other.
The simplest solution to the problem is tandem connection.
In tandem connection, an audio signal (code string) is generated by encoding audio in accordance with a first standard process, then, the audio signal is decoded in accordance with the first standard process, and then, the thus decoded audio signal is encoded again in accordance with a second standard process.
That is, an audio signal is encoded twice, and decoded once. Hence, an audio signal is encoded once greater than a case in which an audio signal is encoded and decoded in accordance with a certain process for encoding/decoding audio, resulting in problems of reduction in audio quality, increase in delay and increase in an amount of calculation.
In contrast, there has been suggested a process for converting a code in a code region or an encoded parameter region such that a code obtained by encoding audio in accordance with one of standard processes is decodable in accordance with the other of standard processes. The suggested process is effective to the above-mentioned problems.
The above-mentioned process is described in Hong-Goo Kang et al., “Improving Transcoding Capability of Speech Coders in Clean and Frame Erasured Channel Environment”, Proc. of IEEE Workshop on Speech Coding 2000, pp. 78-80, 2000 (hereinbelow, referred to as “reference 2”).
FIG. 10 is a block diagram of an example of a conventional code-conversion apparatus 1500 which converts a code obtained by encoding audio in accordance with a first audio-encoding process (hereinbelow, referred to simply as “a first process”), into a code decodable in accordance with a second audio-decoding process (hereinbelow, referred to simply as “a second process”).
The conventional code-conversion apparatus 1500 is comprised of an input terminal 10, a code-demultiplexing circuit 1010, a LP coefficient code conversion circuit 100, an ACB code conversion circuit 200, a FCB code conversion circuit 300, a gain code conversion circuit 400, a code-multiplexing circuit 1020, and an output terminal 20.
A first code string obtained by encoding audio in accordance with the first process is input into the code-demultiplexing circuit 1010 through the input terminal 10.
The code-demultiplexing circuit 1010 demultiplexes a linear prediction coefficient (hereinbelow, referred to as “LP coefficient”), ACB (adaptive codebook), FCB (fixed codebook), and codes corresponding to an ACB gain and a FCB gain, that is, a LP coefficient code, an ACB code, a FCB code and gain codes, out of the first code string.
Herein, it is assumed that an ACB gain and a FCB gain are encoded and decoded together. For simplification of explanation, ACB and FCB gains are referred to as “a gain”, and codes of them are referred to as “a gain code” hereinafter. In order to distinguish these codes from later-mentioned, similar codes, a LP coefficient code, an ACB code, a FCB code and a gain code demultiplexed by the code-demultiplexing circuit 1010 out of the first code string are referred to hereinbelow as “a first LP coefficient”, “a first ACB code”, “a first FCB code” and “a first gain code”, respectively.
The code-demultiplexing circuit 1010 outputs the first LP coefficient code to the LP coefficient code conversion circuit 100, the first ACB code to the ACB code conversion circuit 200, the first FCB code to the FCB code conversion circuit 300, and the first gain code to the gain code conversion circuit 400.
The LP coefficient code conversion circuit 100 receives the first LP coefficient code from the code-demultiplexing circuit 1010, and decodes the first LP coefficient code in accordance with a method of decoding a LP coefficient in the first process to thereby have a first LP coefficient. Then, the LP coefficient code conversion circuit 100 quantizes and encodes the first LP coefficient in accordance with a method of quantizing and encoding a LP coefficient in the second process, to thereby have a second LP coefficient code. The second LP coefficient code is a LP coefficient code decodable in accordance with the second process. Then, the LP coefficient code conversion circuit 100 outputs the second LP coefficient code to the code-multiplexing circuit 1020.
The ACB code conversion circuit 200 receives the first ACB code from the code-demultiplexing circuit 1010, and coverts the received first ACB code into an ACB code decodable in accordance with the second process. The ACB code conversion circuit 200 outputs the resultant ACB code to the code-multiplexing circuit 1020 as a second ACB code.
The FCB code conversion circuit 300 receives the first FCB code from the code-demultiplexing circuit 1010, and coverts the received first FCB code into a FCB code decodable in accordance with the second process. The FCB code conversion circuit 300 outputs the resultant FCB code to the code-multiplexing circuit 1020 as a second FCB code.
The gain code conversion circuit 400 receives the first gain code from the code-demultiplexing circuit 1010, and decodes the received first gain code in accordance with the first process to thereby have a gain. Then, the gain code conversion circuit 400 quantizes and encodes the first gain in accordance with a method of quantizing and encoding a gain in the second process, to thereby have a second gain code. The resultant second gain code is a gain code decodable in accordance with the second process. Then, the gain code conversion circuit 400 outputs the second gain code to the code-multiplexing circuit 1020.
The code-multiplexing circuit 1020 receives the second LP coefficient code from the LP coefficient code conversion circuit 100, the second ACB code from the ACB code conversion circuit, the second FCB code from the FCB code conversion circuit 300, and the second gain code from the gain code conversion circuit 400, and multiplexes them with one another to thereby have a code string. The code-multiplexing circuit 1020 outputs the resultant code string through the output terminal 20 as a second code string.
The conventional code conversion apparatus illustrated in FIG. 10 is accompanied with a problem that in conversion of a FCB code corresponding to FCB expressed with a multi-pulse signal, if the number of pulses in FCB which is in conformity to the first process is different from the number of pulses in FCB which is in conformity to the second process, it would be impossible to accomplish conversion of all FCB codes.
This is because that if the number of pulses in the first process is different from the number of pulses in the second process, there would exist a pulse to which the correspondence in a pulse location code between the first and second processes cannot be applied.
Japanese Patent Application Publication No. 6-222796 has suggested a system for encoding an audio code, including a linear prediction analyzer for obtaining a spectrum parameter of an input audio signal divided into frames every certain interval, an adaptive codebook having an audio-source signal having been determined in the past, an audio-source codebook for vector-quantizing an excitation audio-source of the input audio signal, and a gain codebook for quantizing a gain in each of the adaptive codebook and the audio-source codebook. When the adaptive codebook, the audio-source codebook and the gain codebook are retrieved for each of sub-frames further divided from the frame, there is generated an auditory-sense weighted audio signal having a length equal to a length of the sub-frame, through the use of the input audio signal and the spectrum parameter, and a response signal obtained by providing an input audio signal of a current sub-frame as an initial value with a synthesis filter using the spectrum parameter is obtained in a predetermined length. The response signal is weighted with the spectrum parameter to thereby have an overlap signal. The adaptive codebook, the audio-source codebook and the gain codebook are retrieved in accordance with a signal to which the overlap signal is connected following the auditory-sense weighted audio signal.
Japanese Patent Application Publication No. 8-146997 has suggested a code-conversion system for converting a multiplexed code in conformity to a first audio-encoding process into a multiplexed code in conformity to a second audio-encoding process, including a code-demultiplexer receiving a multiplexed code encoded in accordance with the first audio-encoding process, and demultiplexing the multiplexed code into each codes, a converter converting the codes demultiplexed by the code-demultiplexer, into codes which are in conformity to the second audio-encoding process, in accordance with a correspondence between codes which are in conformity to the first audio-encoding process and codes which are in conformity to the second audio-encoding process, and a multiplexer multiplexing codes having been converted into codes which are in conformity to the second audio-encoding process, by the converter.
Japanese Patent Application Publication No. 10-282997 has suggested an audio-encoder for multiplexing an excitation signal expressed with a multi-pulse signal comprised of a plurality of pulses such that strain between a reproduced audio signal obtained by exciting a linear prediction synthesis filter with the excitation signal, and an input audio signal is minimized. The suggested audio-encoder includes a circuit which determines a pulse location in such a manner that a pulse location where a pulse is not arranged yet is preferential to a pulse location where a pulse has been encodes at stages immediately previous and before.
Japanese Patent Application Publication No. 2001-134296 has suggested a method of decoding an audio signal including the steps of decoding information of an audio-source signal, a gain, and a linear prediction coefficient, out of a received signal, generating an excitation signal and the linear prediction coefficient, based on the decoded information, and driving a filter having the linear prediction coefficient, with the excitation signal to thereby decode an audio signal. The method is characterized by a first step of smoothing the gain in accordance with the past gains, a second step of controlling the thus smoothed gain in accordance with fluctuation calculated, based on the gain and the smoothed gain, and a third step of decoding the audio signal with the smoothed and controlled gain.